package org.NooLab.docserver.storage.db.iciql;

import com.iciql.Iciql.EnumType;
import com.iciql.Iciql.IQColumn;
import com.iciql.Iciql.IQEnum;
import com.iciql.Iciql.IQIndex;
import com.iciql.Iciql.IQIndexes;
import com.iciql.Iciql.IQTable;

@IQTable
@IQIndexes({ @IQIndex({ "productName", "category" }), 
@IQIndex(name = "nameindex", value = "productName") })


public class SampleModel_Product {

	// ................................................
	public SampleModel_Product() {
		// default constructor
	}

	// ................................................

	@IQEnum(EnumType.ORDINAL)
	public enum Availability {
		ACTIVE, DISCONTINUED;
	}

	@IQColumn(primaryKey = true)
	public Integer productId;

	@IQColumn(length = 200, trim = true)
	public String productName;

	@IQColumn(length = 50, trim = true)
	public String category;

	@IQColumn
	public Double unitPrice;

	@IQColumn(name = "units")
	public Integer unitsInStock;

	@IQColumn
	private Integer reorderQuantity;

	@IQColumn
	private Availability availability;

	// ignored because it is not annotated AND the class is @IQTable annotated
	private Integer ignoredField;

}
